<!--
*Author：
 *Contact：
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/workbusiness/PROJ_Contract.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/system/workbusiness/PROJ_Contract.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'PROJContract_Id',
                footer: "Foots",
                cnName: '项目合同',
                name: 'workbusiness/PROJ_Contract',
                url: "/PROJ_Contract/",
                sortName: "CreateOn"
            });
            const editFormFields = ref({"ProjectCode":"","ProjectName":"","ContractNo":"","SetUpProjectDate":"","ProjectClass":"","ProjectPlanStart":"","ProjectPlanEnd":"","ProjctCycle":"","AmountMoney":"","ProjectCustomer":"","ResponsibleDepartment":"","GeneralManager":"","ProjectDesigner":"","ProjectMember":"","Description":""});
            const editFormOptions = ref([[{"title":"项目编码","field":"ProjectCode","type":"text"},
                               {"title":"项目名","field":"ProjectName","type":"text"},
                               {"title":"合同号","field":"ContractNo","type":"text"},
                               {"title":"立项日期","field":"SetUpProjectDate","type":"date"}],
                              [{"title":"项目分类","field":"ProjectClass","type":"text"},
                               {"title":"项目开始日期","field":"ProjectPlanStart","type":"datetime"},
                               {"title":"项目结束日期","field":"ProjectPlanEnd","type":"datetime"},
                               {"title":"项目周期(天)","field":"ProjctCycle","type":"text"}],
                              [{"title":"项目金额","field":"AmountMoney","type":"decimal"},
                               {"title":"项目客户","field":"ProjectCustomer","type":"text"},
                               {"title":"项目负责部门","field":"ResponsibleDepartment","type":"text"},
                               {"title":"总负责人","field":"GeneralManager","type":"text"}],
                              [{"title":"项目设计人","field":"ProjectDesigner","type":"text"},
                               {"title":"项目成员","field":"ProjectMember","type":"text"},
                               {"title":"描述","field":"Description","type":"textarea"}]]);
            const searchFormFields = ref({"ProjectCode":"","ProjectName":"","ContractNo":"","SetUpProjectDate":""});
            const searchFormOptions = ref([[{"title":"项目编码","field":"ProjectCode","type":"text"},{"title":"项目名","field":"ProjectName","type":"text"},{"title":"合同号","field":"ContractNo","type":"text"},{"title":"立项日期","field":"SetUpProjectDate","type":"date"}]]);
            const columns = ref([{field:'PROJContract_Id',title:'PROJContract_Id',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'ProjectCode',title:'项目编码',type:'string',width:110,align:'left',sort:true},
                       {field:'ProjectName',title:'项目名',type:'string',width:110,align:'left'},
                       {field:'ContractNo',title:'合同号',type:'string',width:110,align:'left'},
                       {field:'SetUpProjectDate',title:'立项日期',type:'datetime',width:150,align:'left',sort:true},
                       {field:'ProjectClass',title:'项目分类',type:'string',width:110,align:'left'},
                       {field:'ProjectPlanStart',title:'项目开始日期',type:'datetime',width:150,align:'left',sort:true},
                       {field:'ProjectPlanEnd',title:'项目结束日期',type:'datetime',width:150,align:'left',sort:true},
                       {field:'ProjctCycle',title:'项目周期(天)',type:'string',width:110,align:'left'},
                       {field:'AmountMoney',title:'项目金额',type:'decimal',width:110,align:'left'},
                       {field:'ProjectCustomer',title:'项目客户',type:'string',width:110,align:'left'},
                       {field:'ResponsibleDepartment',title:'项目负责部门',type:'string',width:110,align:'left'},
                       {field:'GeneralManager',title:'总负责人',type:'string',width:110,align:'left'},
                       {field:'ProjectDesigner',title:'项目设计人',type:'string',width:110,align:'left'},
                       {field:'ProjectMember',title:'项目成员',type:'string',width:110,align:'left'},
                       {field:'Description',title:'描述',type:'string',width:220,align:'left'},
                       {field:'Status',title:'新建/激活/保留/废除',type:'string',width:110,hidden:true,align:'left'},
                       {field:'CreateBy',title:'创建人',type:'string',width:110,hidden:true,align:'left'},
                       {field:'CreateOn',title:'创建时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'UpdateBy',title:'更新人',type:'string',width:110,align:'left'},
                       {field:'LastUpdateOn',title:'更新时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'IsDeleted',title:'逻辑删除 0/不删除 1/已删除',type:'bool',width:110,hidden:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
